const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/wikihomepage');
var db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', function() {
  console.log("数据库wiki链接成功")
});
module.exports = db;